/*****************************************************************
 *@Copyright all rights reserved ? 2014 Yuga
 *@author Oplink OMS
 *Contact: zengkang007@gmail.com
 *****************************************************************/
package com.oplink.webems.modules.log.entity;

import java.util.Calendar;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.oplink.webems.common.persistence.DataEntity;
import com.oplink.webems.modules.sys.entity.User;

/**
 * 告警Entity
 * 
 * @author Oplink OMS
 * @version 2014-09-09
 */
@Entity
@Table(name = "log_user")
@DynamicInsert
@DynamicUpdate
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class UserLog extends DataEntity {

	private static final long serialVersionUID = 1L;
	private User user;
	private int sort; // ����
	private Integer ownerId; // 用户编号
	private Integer module; // 模块
	private String desci; // 描述
	private String params; // 参数
	private Calendar timei; // 时间
	
	@Transient
	public String time0;
	@Transient
	public String time1;
	public String getDesci() {
		return desci;
	}

	public void setDesci(String desci) {
		this.desci = desci;
	}

	public Calendar getTimei() {
		return timei;
	}

	public void setTimei(Calendar timei) {
		this.timei = timei;
	}
	
	public Integer getOwnerId() {
		return ownerId;
	}

	public void setOwnerId(Integer ownerId) {
		this.ownerId = ownerId;
	}

	public Integer getModule() {
		return module;
	}

	public void setModule(Integer module) {
		this.module = module;
	}


	public String getParams() {
		return params;
	}

	public void setParams(String params) {
		this.params = params;
	}

	// JPA ����USER_ID�еĶ��һ��ϵ����
	@ManyToOne
	@JoinColumn(name = "user_id")
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@NotNull
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	@Transient
	public String getTime0() {
		return time0;
	}
	@Transient
	public void setTime0(String time0) {
		this.time0 = time0;
	}
	@Transient
	public String getTime1() {
		return time1;
	}
	@Transient
	public void setTime1(String time1) {
		this.time1 = time1;
	}
}
